<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
   	<link rel="stylesheet" href="css/style.css" />
   	<link rel="stylesheet" href="css/iconfont.css" />
   	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
   	<script src="js/com.js" type="text/javascript" charset="utf-8"></script>
   	<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
   	<script src="js/shopcar.js" type="text/javascript" charset="utf-8"></script>
</head>
<body class="bg-idx">
	<div class="header">
		<a href="javascript:history.go(-1);" class="icon iconfont icon-fanhui"></a>
		<h3 class="title">购物车</h3>
	</div>
	<div class="content" id="app">
		<div class="car-list">
			<a v-if="isShow" href="category.html" class="btn-shoping">购物车为空，去购物吧！</a>
			<ul>
				<li v-for="(item,index) in carList">
					<i v-if="item.check" class="check icon-xuanzhong-copy iconfont2" @click="check(item,$event)"></i>
					<i v-else class="check icon-upload-done iconfont2" @click="check(item,$event)"></i>
					<div class="car-item">
						<a class="car-pic" :href="'detail.html?classID='+item.goodInfo.type+'&goodID='+item.goodInfo.id"><img :src="item.goodInfo.img"/></a>
						<div class="car-txt">
							<h3><a :href="'detail.html?classID='+item.goodInfo.type+'&goodID='+item.goodInfo.id">{{item.goodInfo.name}}</a></h3>
							<h4>¥{{item.goodInfo.price}}</h4>
							<div>
								<div class="act-num">
									<button @click="reduce(item)">-</button>
									<input type="text" readonly="readonly"  v-model="item.num" />
									<button  @click="add(item)">+</button>
								</div>
								<span class="iconfont2 icon-shanchu" @click="del(item,index)"></span>
							</div>
						</div>
					</div>
				</li>
				<!--<li>
					<i class="check icon-dizhi iconfont"></i>
					<div class="car-item">
						<a class="car-pic" href=""><img src="img/111.jpg"/></a>
						<div class="car-txt">
							<h3><a href="">这是商品的名称这是商品的名称这是商品的名称</a></h3>
							<h4>¥200.20</h4>
							<div>
								<div class="act-num">
									<button>-</button>
									<input type="text" readonly="readonly" value="1" />
									<button>+</button>
								</div>
								<span class="iconfont icon-shoucang"></span>
							</div>
						</div>
					</div>
				</li>-->
			</ul>
		</div>
		<div class="car-account">
			<div class="all-check">
				<span  v-if="allCheck"  @click="allChoice($event)"><i class="icon-xuanzhong-copy  iconfont2"></i>&nbsp;全选</span>
				<span v-else  @click="allChoice($event)"><i  class="icon-upload-done iconfont2"></i>&nbsp;全选</span>
			</div>
			<div class="all-txt">
				合计：<span>¥{{allPrice}}</span>
			</div>
			<a href="">去结算</a>
		</div>
	</div>
	<div class="footer">
		<a href="index.html">
			<i class="icon icon-index iconfont"></i>
			<span>首页</span>
		</a>
		<a href="category.html">
			<i class="icon icon-fenlei iconfont"></i>
			<span>分类</span>
		</a>
		<a  class="active" href="shopcar.html">
			<i class="icon icon-gouwuche iconfont"></i>
			<span>购物车</span>
		</a>
		<a href="user.html">
			<i class="icon icon-user iconfont"></i>
			<span>我的</span>
		</a>
	</div>
</body>
</html>